Repository navigation
kernel/user partition, Phase 4 part 5: remove the last unused kernel-only includes - #11480
Merged
Merged
Conversation
The IADK system agent, KPB service and timestamping service only use the APP_TASK_DATA partition marker, which rtos/userspace_data.h defines. rtos/userspace_helper.h is the kernel-only header for the memory domain and stack helpers, and includes rtos/userspace_data.h. Include only what these sources use. No functional change. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Liam Girdwood <[email protected]>
rtos/wait.h uses nothing from rtos/timer.h: its delays use Zephyr's k_busy_wait(). Drop the include, which brought the platform timestamp and cycle counter header into the user-space sources that use the delays. zephyr/wrapper.c used the cycle counter through this header, so it includes rtos/timer.h. No functional change. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Liam Girdwood <[email protected]>
sof/auth_api_iface.h, which sof/lib_manager.h includes, uses the status logger callback types of auth/intel_status_logger_iface.h. So the user-space sources that include the library manager header, the IPC4 user-space handler and the native system service, got a header from the kernel platform directory. It only defines callback types. Move it to src/platform, and include it by its include name in intel_status_logger_api.h, which included it by a path relative to the old directory. No functional change. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Liam Girdwood <[email protected]>
Six sources no longer include kernel-only headers in any configuration: the three IADK service sources, the native system service, the IPC4 user-space handler and the detect test sample. Remove them from the leak baseline. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Liam Girdwood <[email protected]>
lgirdwood
force-pushed
the
kernel-user/phase4e
branch
from
November 18, 2026 10:45
087557a to
d681230
Compare
lgirdwood
marked this pull request as ready for review
November 18, 2026 11:36
lgirdwood
requested review from
abonislawski,
dbaluta,
iuliana-prodan,
kv2019i,
lbetlej,
lyakh,
mmaka1 and
plbossart
as code owners
November 18, 2026 11:36
Member
Author
|
unrelated CI issues with docker. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 4 of #11306 (kernel / user-space partition), fifth part: remove the last kernel-only includes that user-space code does not use, and shrink the leak baseline from 22 to 16 sources.
Patches
iadk: the IADK system agent, KPB service and timestamping service only use theAPP_TASK_DATApartition marker. They includertos/userspace_data.h, which defines it, instead of the kernel-onlyrtos/userspace_helper.h.rtos: wait:rtos/wait.huses nothing fromrtos/timer.h; its delays usek_busy_wait(). Dropping the include keeps the platform timestamp and cycle counter header out of the user-space sources that use the delays.zephyr/wrapper.cused the cycle counter through it and now includesrtos/timer.h.platform: intel: ace: moveauth/intel_status_logger_iface.htosrc/platform.sof/auth_api_iface.huses them, andsof/lib_manager.hincludes that, so the IPC4 user-space handler and the native system service got a header from the kernel platform directory.intel_status_logger_api.h, which included it by a path relative to the old directory, now includes it by its include name.src/platformREADME lists it.What is left
With this, no user-space source includes a kernel-only header that it does not use. The 16 sources left in the baseline call kernel functions, which needs system calls or design changes rather than header work. They are the remaining Phase 5 items:
irq_local_disable()/irq_local_enable()platform_host_timestamp(),platform_dai_timestamp(),platform_dai_wallclock()sof_cycle_get_64(),perf_cnt)clock_get_freq(),core_kcps_*(),CLK_MAX_CPU_HZ)sa_set_panic_on_delay(),watchdog_feed()pm_runtime_*(),HEAP_HP_BUFFER_BLOCK_SIZEuser_stack_free()Functional change
None.
Testing
--strict, it passes for each of the 12 CI build configurations, built locally as CI does (repro-build.conf,-Werror), and for every other configuration below. Across all of them, exactly the 16 baseline sources leak.CONFIG_SOF_USERSPACE_PROXY=n;os_linux_overlay.conf;llext_relocatable.conf;app/debug_stream_overlay.conf, and PTL with that overlay and user-space LL.SYS_INIT()order), and the per-function disassembly. No object changes at any commit. The only image difference issof_init()on imx8m_cm7, imx93 and imx95, which embeds the git hash.All of the above was run on 72e797d (current main).
Changes since the last push
🤖 Generated with Claude Code